<!DOCTYPE html>
<html>
	{include file="public/_header" /}
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div class="x-nav">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a>
					<cite>图片上传</cite></a>
			</span>
			<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()"
			 title="刷新">
				<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
			</a>
		</div>
		
		<!-- 正文开始 -->
		<div class="layui-fluid">
		    <div class="layui-row layui-col-space15">
		
		        <div class="layui-col-xs12 layui-col-md12">
		            <div class="layui-card" style="">
		                <div class="layui-card-header">图片七牛上传</div>
		                <div class="layui-card-body">
		                    <div class="layui-row">
		                        <button type="button" class="layui-btn" id="test1">
		                          <i class="layui-icon">&#xe67c;</i>上传图片
		                        </button>
		                    </div>
		                </div>
		            </div>
		        </div>
	
		    </div>
		
		</div>
	</body>
	<script>
	layui.use('upload', function(){
	  var upload = layui.upload;
	   
	  //执行实例
	  var uploadInst = upload.render({
	    elem: '#test1', //绑定元素
	    url: 'http://www.unicms.cc/api/v1/index/up', //上传接口
	    done: function(res){
	      //上传完毕回调
	    },error: function(){
	      //请求异常回调
	    }
	  });
	});
	</script>
</html>
